Binary Code Extraction and Interface Identification for Security Applications

نویسندگان

  • Juan Caballero
  • Noah M. Johnson
  • Stephen McCamant
  • Dawn Xiaodong Song
چکیده

Binary code reutilization is the process of automatically identifying the interface and extracting the instructions and data dependencies of a code fragment from an executable program, so that it is selfcontained and can be reused by external code. Binary code reutilization is useful for a number of security applications, including reusing the proprietary cryptographic or unpacking functions from a malware sample and for rewriting a network dialog. In this paper we conduct the first systematic study of automated binary code reutilization and its security applications. The main challenge in binary code reutilization is understanding the code fragment’s interface. We propose a novel technique to identify the prototype of an undocumented code fragment directly from the program’s binary, without access to source code or symbol information. Further, we must also extract the code itself from the binary so that it is self-contained and can be easily reused in another program. We design and implement a tool that uses a combination of dynamic and static analysis to automatically identify the prototype and extract the instructions of an assembly function into a form that can be reused by other C code. The extracted function can be run independently of the rest of the program’s functionality and shared with other users. We apply our approach to scenarios that include extracting the encryption and decryption routines from malware samples, and show that these routines can be reused by a network proxy to decrypt encrypted traffic on the network. This allows the network proxy to rewrite the malware’s encrypted traffic by combining the extracted encryption and decryption functions with the session keys and the protocol grammar. We also show that we can reuse a code fragment from an unpacking function for the unpacking routine for a different sample of the same family, even if the code fragment is not a complete function.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Reverse Engineering of Network Software Binary Codes for Identification of Syntax and Semantics of Protocol Messages

Reverse engineering of network applications especially from the security point of view is of high importance and interest. Many network applications use proprietary protocols which specifications are not publicly available. Reverse engineering of such applications could provide us with vital information to understand their embedded unknown protocols. This could facilitate many tasks including d...

متن کامل

Extraction of properties in C implementations of security APIs for the verification of Java applications

Java applications utilize various security APIs for cryptography and access control, such as available through packages java.security and javax.crypto. For performance reasons, these libraries internally use an implementation written in C, accessed through the Java Native Interface. Our goal is to extract properties in the source code of the C library, and translate these assertions back into t...

متن کامل

BISTRO: Binary Component Extraction and Embedding for Software Security Applications

In software security and malware analysis, researchers often need to directly manipulate binary program – benign or malicious – without source code. A useful pair of binary manipulation primitives are binary functional component extraction and embedding, for extracting a functional component from a binary program and for embedding a functional component in a binary program, respec­ tively. Such...

متن کامل

FIST: A Framework for Instrumentation in Software Dynamic Translators

Software dynamic translators (SDT) typically monitor, profile, and affect the execution of a program. Such systems have been used to build many useful applications, including dynamic code optimizers for binary machine code and Java bytecode, software security checkers, binary translators, code profilers and program introspection tools. While all of these systems use program instrumentation, the...

متن کامل

Rico: a security proxy for mobile code

Security technology suitable for the burgeoning embedded system market has not been widespread. Untrusted code downloaded from the Internet poses numerous security risks due to the possible presence of viruses or other malicious entities. System administrators typically administer one or more administrative domains making policy management for mobile code a challenge because of the diverse secu...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2010